import { OrgQueryServiceApi } from "./_org";
import service from "@/api";
import { AxiosResponse } from "axios";
import { objectToUrlParams } from "@/utils/common";
/**用户查询服务 */
class QueryUserServiceApi extends OrgQueryServiceApi {
  /**
   * 用于用户搜素请求
   * @param likeAll 搜素字段 可以搜素账号/名称/手机号
   * @returns
   */
  userListSelect(likeAll: string | null) {
    return service.get(this.baseUrl + "/userList", {
      params: {
        queryName: "userList",
        subOrgId: 10000,
        showCols: "userId,userAccount,userFullname,userImageUrl,unitName",
        likeAll
      }
    });
  }
  userList(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/userList";
    url += objectToUrlParams(params, true);
    return service.get(url, { params: { ...bean } });
  }
}
const queryUserServiceApi = new QueryUserServiceApi("/QueryUserService");
export default queryUserServiceApi;
